#!/usr/bin/python
# [ "1mins", "15mins", "30mins", "1hour", "4hours", "8hours", "12hours", "1day" ]

import webapp2
from modules.Predef import Predef as PRE

import modules.cron

class CronHandler(webapp2.RequestHandler):

    def get(self, door):
        if door in PRE.doors:
            go=modules.cron.cron(door)
            go.run()
            go.mail()
            go.flush()

app = webapp2.WSGIApplication([(r'/cron/(.*)', CronHandler)], debug=True)
